<%@ page language="java"  pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/views/common/taglib.jsp" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>我的</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="HandheldFriendly" content="true" />
    <meta name="viewport" content="width=320.1, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <%@ include file="/WEB-INF/views/common/resource.jsp" %>
    <script>
        var ctx = '${ctx}';
    </script>
</head>
<body>
<div class="pop_bg"></div>
<div class="pop_box list" id="sign_out_box" style="padding-bottom: 70px;">
    <p style="text-align: center; font-size: 19px; color: #373737;">确认退出？</p>
    <ul class="bottom_btn">
        <li id="close">取消</li>
        <li onclick="loginOut()">确定</li>
    </ul>
</div>

<div class="page order pt0">
    <div class="user_head_box">
        <img src="${itx}/images/my_bg.png" width="100%" >
        <div class="user_img_box"><img src="${user.courier_head_img_url}" width="65" height="65" /></div>
        <h1>${user.courier_name}</h1>
    </div>
    <div class="user_btn_list">
        <ul>
            <li id="sign_out">
                <p><i class="iconfont icon-tuichu"></i>退出登录</p>
            </li>
        </ul>
    </div>
    <p style="padding: 10px 15px;">如果您的手机号有变化，请致电对应经销商进行修改</p>
    <div class="footer shopper">
        <ul>
            <li  onclick="location.href=ctx+'/courier/courierIndex.do'">
                <i class="iconfont icon-dingdan"></i>
                <span>订单</span>
            </li>
            <li class="onthis" onclick="location.href=ctx+'/courier/toCourierInfo.do'">
                <i class="iconfont icon-wode"></i>
                <span>我的</span>
            </li>
        </ul>
    </div>
</div>
<script type="text/javascript">
    $('.pop_bg').click(function(e){
        $('.pop_bg').hide();
        $('.pop_box').hide();
    })

    $('#close').click(function(e){
        $('.pop_bg').hide();
        $('.pop_box').hide();
    })

    $('#sign_out').click(function(e){
        $('.pop_bg').height($(document).height());
        $('.pop_bg').show();
        $('#sign_out_box').show();
    })
    function loginOut() {
        $.ajax({
            type: "post",
            url: '/user/loginOut.do',
            dataType: "json",
            data: {
            },
            success: function(resp){
                console.log(resp);
                if(resp.result==="success"){
                    location.href='${ctx}/';
                }else{
                }
            }
        });
    }
</script>
</body>
</html>
